<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>学生请假系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
          integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
    <style>
        .nav-item {
            margin-left: 40px;
        }

        .nav-item a {
            font-size: 16px;
        }
        .navbar-nav {
            margin-left: 50px;
        }

        main {
            margin: 20px auto;
            margin-bottom: 70px;
        }

        .footer-nav span, .footer-nav a {
            color: #8f8e94;
            font-size: 12px;
        }
        .info{
            display: flex;
            height: 20px;
            margin-top: 10px;
        }
        .info span{
            margin-right: 10px;
        }

    </style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03"
            aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <a class="navbar-brand" href="#">学生请假系统</a>

    <div class="collapse navbar-collapse" id="navbarTogglerDemo03">
        <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
            <li class="nav-item active">
                <a class="nav-link" href="/vacate">请假</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/vacationlist">我的假条</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/userinfo">个人信息</a>
            </li>
            <li class="nav-item">
                <a class="nav-link " href="/logout"> 退出</a>
            </li>
        </ul>
        <form class="form-inline my-2 my-lg-0">
            <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
        </form>
    </div>
</nav>
<main>
    <div class="content" th:include="::content">页面正文内容</div>
</main>
<foooer>
    <div th:include="footer :: footer"></div>
</foooer>
<script>
    function del(vacationid) {
        var r =confirm("确定删除此假条记录？");
        if (!r){
         return;
        }
        fetch("/del?vacationid="+vacationid).then(res=>res.json())
        .then(res=>{
           if(res){
              alert("删除成功");
              window.location.href="/vacationlist";
           }
        })

    }
</script>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
        crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
        crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
        integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
        crossorigin="anonymous"></script>
</body>
</html>